package com.hsy.crm.web.domain.cm;

public final class App {

    private App(){}



    public static class DECIMAL{
        public static final int LENGTH = 6;
        public static final Long DIV = 1000000L;
    }

    public static class ExamineSource{
        public static final int INSERT = 1;
        public static final int UPDATE = 2;
    }

    public static class StoneCheck{
        public static final int ING = 1;
        public static final int END = 0;
    }

    public static class BussType{
        public static final int IN = 1;
        public static final int OUT = 2;
    }

    public static class Account{
        public static final int DEFAULT = -100;
        public static final int NORMAL = 1;
    }

    public static class ThStatus{
        public static final int NO = 0;
        public static final int YES = 1;
    }

    public static class Task{
        public static final long SLEEP = 1000;
    }

    /**
     * 单据类型
     */
    public static class BILL_TYPE{
        /**
         * 采购订单
         */
        public static final int ORDER_CGDD = 1;
        /**
         * 进货单
         */
        public static final int ORDER_JHD = 3;
        /**
         * 进货退货单
         */
        public static final int ORDER_JHTHD = 4;
        /**
         * 销售订单
         */
        public static final int ORDER_XSDD = 20;
        /**
         * 售货单
         */
        public static final int ORDER_SHD = 22;
        /**
         * 售货退货单
         */
        public static final int ORDER_SHTHD = 23;
        /**
         * 其它入库单
         */
        public static final int ORDER_QTRKD = 50;
        /**
         * 其他出库单
         */
        public static final int ORDER_QTCKD = 51;
        /**
         * 盘点单
         */
        public static final int ORDER_PD = 52;
        /**
         * 调拨单
         */
        public static final int ORDER_DB = 53;
        /**
         * 拆装单
         */
        public static final int ORDER_CZ = 54;
        /**
         * 收款单
         */
        public static final int FIN_SK = 80;
        /**
         * 付款单
         */
        public static final int FIN_FK = 81;
        /**
         * 其它入库单
         */
        public static final int FIN_QR = 82;
        /**
         * 其它出库单
         */
        public static final int FIN_QC = 83;
        /**
         * 核销单
         */
        public static final int FIN_HX = 84;
        /**
         * 资金转账单
         */
        public static final int FIN_ZZ = 85;
    }

    public static class StoreType{
        public static final int IN = 1;
        public static final int OUT = 0;
    }

    public static class Direction{
        public static final int ADD = 1;
        public static final int SUB = 0;
    }

    public static class UnitType{
        public static final int MASTER = 1;
        public static final int SLAVE = 2;
    }

    public static class OrderType{
        public static final int CG = 1;
        public static final int XS = 2;
    }

    public static class ExamType{
        public static final int EXAMINE = 1;
        public static final int INVALID = 2;
    }

    public static class Message{

        public static class Status{
            public static final int NOT_START = 1;
            public static final int HANDLE_ED = 3;
        }

    }

    public static class ThType{
        /**
         * 订单
         */
        public static final int DD = 1;
        /**
         * 具体的单子  非订单   例如:采购单、销售单
         */
        public static final int DZ = 2;
    }

    public static class OtherType{
        public static final int IN = 1;
        public static final int OUT = 0;
    }

    public static class ExamRoles{
        public static final String CG = "1";
        public static final String XS = "2";
        public static final String CK = "3";
        public static final String CW = "4";
        public static final String GLY = "5";
    }

    public static class Status{
        public static final int BC = 1;
        public static final int SH = 2;
        public static final int ZF = 0;
    }

    public static class StatusDD extends Status{

        /**
         * 未款   【未付款、未收款】    如果是订单则是未入库
         */
        public static final int WK = 20;
        public static final int BFK = 21;
        public static final int QK = 22;
        //大于20的数字 如果使用  必须是审核通过后的某种状态  否则不能使用
    }

    public static class Dict{
        public static final int ENABLE = 1;
        public static final int DISABLE = 0;


        //盘存锁
        public static final long STORE_CHECK_CODE = 1000000000l;
        //最大用户数
        public static final long USER_MAX_NUMBER  = 1000000001l;
        //启用审核
        public static final long EXAM_ENABLE      = 2000000001l;
        //启用负库存
        public static final long STORE_ENABLE     = 2000000002l;
        //计价方式
        public static final long VALUATION_TYPE   = 2000000003l;
        //启用保质期管理
        public static final long FINE_DATE_ENABLE = 2000000004l;
        //批次号
        public static final long BATCH_NUMBER     = 2000000005l;
        //库存预警
        public static final long STORE_WARN       = 2000000006l;
        //启用SN管理
        public static final long SERIAL_NUMBER    = 2000000007l;
        //启用销售单价为0时提示
        public static final long SALE_PRICE_TIP   = 2000000008l;
        //启用采购单价为0时提示
        public static final long PUR_PRICE_TIP    = 2000000009l;
        //启用销售类单据日期不允许修改
        public static final long SALE_DATE_EDIT   = 2000000010l;
        //启用采购类单据日期不允许修改
        public static final long PUR_DATE_EDIT    = 2000000011l;




    }

    public static class SaveType{
        public static final int SAVE = 1;
        public static final int EXAMINE = 2;
    }

    public static class Config{
        public static String ROOT = null;
        public static String EXCEL_TEMPLATE_DIR = null;

        static {
            ROOT = System.getProperty("user.dir").replace("\\","/")+"/";
            EXCEL_TEMPLATE_DIR = ROOT+"src/main/resources/template/";
        }
    }

    public static class Encode {
        public final static String UTF_8 = "UTF-8";
    }

    public static class encrypt {
        public final static String MD5 = "MD5";
    }

    public static class Result {
        public final static int PARAM_ERROR = 1;
        public final static int BUSI_ERROR = 5;
        public final static int UNSAFE_ERROR = 3;
        public final static int SUCCESS = 0;
    }

    public static class PostValueType{
        public static final int STRING = 0;
        public static final int FILE = 1;
    }

    public static class Booleans{
        public static final int YES = 1;
        public static final int NO = 0;


        public static final String isYes(){
            return "是";
        }

        public static final String isNo(){
            return "否";
        }

    }

    public static class VerificateType{
        //预收冲应收
        public static final int YS_YS = 1;
        //预付冲应付
        public static final int YF_YF = 2;
        //应收冲应付
        public static final int YS_YF = 3;
        //应收转应收
        public static final int YIS_YS = 4;
        //应付转应付
        public static final int YIF_YF = 5;
    }

    public static class Symbol{
        public static final String SEMICOLON = ";";
        public static final String EQUAL = "=";
        public static final String SPACE = " ";
    }

    public static class DbOperatorType{
        public static final int INSERT = 1;
        public static final int DELETE = 2;
        public static final int UPDATE = 3;
        public static final int SELECT = 4;
    }

    public static class DbDefaultValue{
        public static final Long  BIGINT= -1L;
        public static final String  CHAR = "";
        public static final Integer  INT = -1111111111;
        public static final Double  DOUBEL = -1D;
    }

    public static class NumberStr{
        public static final String NUM1= "1";
    }

    public static class Boolean{
        public static final boolean FALSE = false;
        public static final boolean TRUE = true;
    }

    public static class Property{
        public static final String ID = "id";
        public static final String NAME = "name";
        public static final String CREATE_TIME = "createTime";
        public static final String CREATE_USER_ID = "createUserId";
        public static final String LOGIN_USER_ID = "loginUserId";
        public static final String UPDATE_TIME = "updateTime";
        public static final String UPDATE_USER_ID = "updateUserId";
        public static final String COMPNAY_ID = "companyId";
        public static final String LOGIN_COMPNAY_ID = "loginCompanyId";
        public static final String CODE = "code";
        public static final String CUSTOMER_ID = "customerId";
    }

    public static class Column{
        public static final String CREATE_TIME = "create_time";
    }

    public static class SqlOrder{
        public static final String DESC = "desc";
    }

    public enum BussError{

        PURCHASE_TYPE_DELETE_ORDER(10000,"该类型被订单使用，不能删除"),
        ACCOUNT_DELETE_ORDER(10001,"该账户被订单使用，不能删除"),
        BRAND_DELETE_PRODUCT(10002,"该品牌被商品使用，不能删除"),
        PRODUCT_DELETE_ORDER(10003,"该商品被订单使用，不能删除"),
        PRODUCT_TYPE_DELETE_PRODUCT(10004,"该商品分类被商品使用，不能删除"),
        NAME_REPEAT(10006,"名称不能重复"),
        CODE_REPEAT(10007,"编号不能重复"),
        COMPANY_EXP(10008,"数据异常"),
        EXAM_NO_AUTH(10009,"没有审核权限"),
        COMPANY_DELETE_1(10010,"公司有下级不能删除"),
        COMPANY_DELETE_2(10011,"公司下有员工不能删除"),
        DELETE_CHILD(100012,"有下级，不能删除"),
        VENDOR_TYPE_DELETE_VENDOR(10013,"该分类被供应商使用，不能删除"),
        CUS_TYPE_DELETE_CUS(10014,"该分类被客户使用，不能删除"),
        STORE_DELETE_PRODUCT(10015,"该仓库有库存商品，不能删除"),
        BARCODE_REPEAT(100016,"条码不能重复"),
        ORDER_JHTH_NUMBER(100017,"指定采购单时，退货数量不能大于进货数量"),
        LOGIN_ERROR(100018,"用户名或密码错误"),
        USER_DEELTE(100019,"不能删除自己"),
        LEVEL_NAME_REPEAT(10020,"同级别下名称重复"),
        ROLE_DELETE_MENU(100021,"角色有菜单，不能删除"),
        ROLE_DELETE_USER(100022,"角色有用户使用，不能删除"),
        USER_NAME(100023,"登录帐号重复，登录帐号全平台唯一"),
        ROLE_AUT(100024,"不能修改登陆人所属角色权限"),
        PRINT_PARAMS(10025,"打印参数错误"),
        PRODUCT_IS_DELETE(10026,"商品已被删除"),
        VENDOR_IS_DELETE(10027,"供应商已被删除"),
        CUSTOMER_IS_DELETE(10028,"客户已被删除"),
        UNIT_DELETE_PRODUCT(10029,"该单位被商品使用，不能删除"),
        STORE_DELETE_TRANSFER(10030,"该仓库有调拨记录，不能删除"),
        ORDER_DELETE_RECEIPT(10031,"该单据已关联收款单/付款单"),
        ORDER_DELETE_HX(10032,"该单据已核销"),
        VENDOR_DELETE_ORDER(10033,"该供应商下有采购单据，不能删除"),
        VENDOR_DELETE_RECEIPT(10034,"该供应商下有收款单据，不能删除"),
        VENDOR_DELETE_HX(10035,"该供应商下有核销单据，不能删除"),
        CUSTOMER_DELETE_ORDER(10036,"该客户下有采购单据，不能删除"),
        CUSTOMER_DELETE_RECEIPT(10037,"该客户下有收款单据，不能删除"),
        CUSTOMER_DELETE_HX(10038,"该客户下有核销单据，不能删除"),
        ORDER_DELETE_ORDER(10039,"已有关联单据（退货单、销售单、采购单），不能反审核"),
        ORDER_BACK_NUMBER(10040,"退货数量不能大于源单数量"),
        PRINT_DELETE(10041,"系统初始化模板不能删除"),
        USER_PHONE(100042,"员工手机号错误，手机号全平台唯一");

        private int code;
        private String message;

        BussError(int code,String message){
            this.code = code;
            this.message = message;
        }

        public int getCode() {
            return code;
        }

        public String getMessage() {
            return message;
        }
    }



}
